Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stdlib/array-uint32

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stdlib/array-uint32

Uint32Array.

  • 0.1.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
402K
increased by0.3%
Maintainers
4
Weekly downloads
 
Created

What is @stdlib/array-uint32?

@stdlib/array-uint32 is a package that provides utilities for creating and manipulating unsigned 32-bit integer arrays. It is part of the larger @stdlib library, which offers a wide range of mathematical, statistical, and utility functions for JavaScript and Node.js.

What are @stdlib/array-uint32's main functionalities?

Creating a Uint32Array

This feature allows you to create a new Uint32Array from an array of numbers. The resulting array will contain unsigned 32-bit integers.

const uint32Array = require('@stdlib/array-uint32');
const arr = uint32Array([1, 2, 3, 4]);
console.log(arr);

Accessing Elements

You can access elements in the Uint32Array using standard array indexing.

const uint32Array = require('@stdlib/array-uint32');
const arr = uint32Array([1, 2, 3, 4]);
console.log(arr[0]); // 1
console.log(arr[1]); // 2

Setting Elements

This feature allows you to set elements in the Uint32Array using standard array indexing.

const uint32Array = require('@stdlib/array-uint32');
const arr = uint32Array([1, 2, 3, 4]);
arr[0] = 10;
console.log(arr); // Uint32Array [ 10, 2, 3, 4 ]

Typed Array Methods

Uint32Array supports various typed array methods such as subarray, which allows you to create a new view of the array from a specified start and end index.

const uint32Array = require('@stdlib/array-uint32');
const arr = uint32Array([1, 2, 3, 4]);
const subArray = arr.subarray(1, 3);
console.log(subArray); // Uint32Array [ 2, 3 ]

Other packages similar to @stdlib/array-uint32

Keywords

FAQs

Package last updated on 09 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc